<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>v-if & v-show</title>

    <link rel="stylesheet" href="../assets/css/bootstrap.css">
    <link rel="stylesheet" href="../assets/css/mystyle.css">

    <script src="../assets/js/jquery.js"></script>
    <script src="../assets/js/bootstrap.js"></script>
    <script src="../assets/js/vue.js"></script>
</head>

<body>
    <span> v-if： 判断是否加载，可以减轻服务器的压力，在需要时加载。 </span><br>
    <span> v-show：调整css dispaly属性，可以使客户端操作更加流畅。 </span>
    <br><br>
    <div id="app">
        <div v-if="isTrue"> {{ifMessage}} </div>
        <div v-else>请登录</div>

        <div v-show="isShow">
            
        </div>
    </div>
    <script>
        new Vue({
            el: "#app",
            data: {
                isShow: true,
                isTrue: true,
                ifMessage: "hello, mrx",
                showMessage: "show"

            },
            methods: {
                changShow: function(){
                    return
                }
            }
        });
    </script>
</body>

</html>